import request from "@/utils/request";

export function login(data){
    return request({
        url:"/api/login",
        method:"post",
        data
    })
}

export function user(){
    return request({
        url:"/api/user",
        method:"get"
    })
}

export function withdraw(money){
    return request({
        url:"/api/withdraw",
        method:"post",
        data:{money:money}
    })
}

export function updateAlipay(real_name,account){
    return request({
        url:"/api/alipay",
        method:"post",
        data:{real_name:real_name,alipay_account:account}
    })
}

export function withdrawLog(){
    return request({
        url:"/api/withdraw-log",
        method:"get",
    })
}

export function updatePassword(oldPassword,password){
    return request({
        url:"/api/password",
        method:"post",
        data:{password:password,old_password:oldPassword}
    })
}
